home *** CD-ROM | disk | FTP | other *** search
/ Graphics & Sound Program…ng Techniques for the Mac / Graphics and Sound Programming Techniques for the Mac.iso / M&T Graphics & Sound Examples / Symantec Versions / C09 App-QuickTime / P01 Film Edit / Initialize.c < prev    next >
Encoding:
Text File  |  1995-08-31  |  1.4 KB  |  68 lines  |  [TEXT/KAHL]

  1.  
  2. //____________________________________________________________
  3. //    Initialize.c
  4. //
  5. //    Copyright © Dan Parks Sydow, 1995
  6. //    From the book:
  7. //    "Graphics and Sound Programming Techniques for the Mac",
  8. //    M&T Books, 1995
  9.  
  10.  
  11. //____________________________________________________________
  12.  
  13. #include <Movies.h>
  14.  
  15. #include "Defines.h"
  16. #include "DataTypes.h"
  17. #include "Globals.h"
  18. #include "Initialize.h"
  19.  
  20.  
  21. //____________________________________________________________
  22.  
  23. void  InitializeAllToolboxes( void )
  24. {
  25.    OSErr  theError;
  26.    long   theResult;
  27.  
  28.    InitGraf( &qd.thePort );
  29.    InitFonts();
  30.    InitWindows();
  31.    InitMenus();
  32.    TEInit();
  33.    InitDialogs( 0L );
  34.    FlushEvents( everyEvent, 0 );
  35.    InitCursor();
  36.  
  37.    MoreMasters();
  38.    MoreMasters();
  39.    MaxApplZone();
  40.    
  41.    theError = Gestalt( gestaltQuickTime, &theResult );
  42.    if ( theError != noErr )
  43.       ExitToShell();
  44.                                                  
  45.    theError = EnterMovies();  
  46.    if ( theError != noErr )
  47.       ExitToShell(); 
  48. }
  49.  
  50.  
  51. //____________________________________________________________
  52.  
  53. void  SetUpMenuBar( void )     
  54. {       
  55.    Handle      theMenuBar;  
  56.    MenuHandle  theAppleMenu;
  57.    
  58.    theMenuBar = GetNewMBar( rMenuBar );      
  59.    SetMenuBar( theMenuBar );
  60.    DisposeHandle( theMenuBar );
  61.    
  62.    theAppleMenu = GetMHandle( mApple );
  63.    AddResMenu( theAppleMenu, 'DRVR' ); 
  64.  
  65.    DrawMenuBar(); 
  66. }
  67.  
  68.